<script lang="ts" setup>
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { object as zobject, string as zstring } from 'zod'

const templateResource = {
  shenpi_gongzuo: import.meta.env.VITE_FORM_TEMPLATE_shenpi_gongzuo,
  shenpi_shouru: import.meta.env.VITE_FORM_TEMPLATE_shenpi_shouru,
  shenpi_qinshu: import.meta.env.VITE_FORM_TEMPLATE_shenpi_qinshu,
  shenpi_tongxunlu: import.meta.env.VITE_FORM_TEMPLATE_shenpi_tongxunlu,
  shenpi_zhima: import.meta.env.VITE_FORM_TEMPLATE_shenpi_zhima,
  ludan_hetong: import.meta.env.VITE_FORM_TEMPLATE_ludan_hetong,
  ludan_queren: import.meta.env.VITE_FORM_TEMPLATE_ludan_queren,
  ludan_chaifeng: import.meta.env.VITE_FORM_TEMPLATE_ludan_chaifeng,
  ludan_shouchi: import.meta.env.VITE_FORM_TEMPLATE_ludan_shouchi,
  ludan_jiasuo1: import.meta.env.VITE_FORM_TEMPLATE_ludan_jiasuo1,
  ludan_jiasuo2: import.meta.env.VITE_FORM_TEMPLATE_ludan_jiasuo2,
  ludan_suoche1: import.meta.env.VITE_FORM_TEMPLATE_ludan_suoche1,
  ludan_suoche2: import.meta.env.VITE_FORM_TEMPLATE_ludan_suoche2,
}

const anchor = ref('')

onLoad(async (query) => {
  const zparse = zobject({
    anchor: zstring(),
  }).safeParse(query)
  if (!zparse.success) {
    return
  }

  anchor.value = zparse.data.anchor ?? ''
})
</script>

<template>
  <view class="mt-20px bg-white p-20px pb-43px">
    <template v-if="anchor === 'risk-control_workCertificate'">
      <view class="text-34px font-400 lh-80px">工作证明</view>
      <view class="">
        <view class="text-26px lh-[1.5]">本年度社保记录、公积金记录、企业钉钉及微信、有工作内容的建成&thinsp;1&thinsp;月以上的工作群、卡发明细、企业&thinsp;APP&thinsp;如美团饿了么实名、企业&thinsp;CRM&thinsp;系统，所有证明文件图片或视频都需要包含该软件的客户实名页面</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.shenpi_gongzuo },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'risk-control_incomeCertificate'">
      <view class="text-34px font-400 lh-80px">收入证明</view>
      <view class="">
        <view class="text-26px lh-[1.5]">银行卡明细、工资单、支付宝微信备注工资的转账、快递外卖运输等类型企业&thinsp;APP&thinsp;提现，以上至少近三个月的工作收入证明，所有证明文件图片或视频都需要包含该软件的客户实名页面</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.shenpi_shouru },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'risk-control_userOne'">
      <view class="text-34px font-400 lh-80px">联系人&thinsp;1</view>
      <view class="">
        <view class="text-26px lh-[1.5]">电话通讯录：电话通讯录输入&thinsp;1&thinsp;后，进行录屏或截图，要求至少&thinsp;3&thinsp;页</view>
        <view class="text-26px lh-[1.5]">请按模版上传直系亲属联系方式验证视频</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.shenpi_tongxunlu },
              { fileUrl: templateResource.shenpi_qinshu },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'risk-control_userTwo'">
      <view class="text-34px font-400 lh-80px">联系人&thinsp;2 </view>
      <view class="">
        <view class="text-26px lh-[1.5]">通讯录输入数字&thinsp;1&thinsp;截图&thinsp;3&thinsp;张或输入数字&thinsp;1&thinsp;的录屏</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.shenpi_tongxunlu },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'risk-control_zhimaCreditRecording'">
      <view class="text-34px font-400 lh-80px">芝麻信用录屏文件</view>
      <view class="">
        <view class="text-26px lh-[1.5]">录屏包含：芝麻分及守约记录中的“服务中”“待守约”“已逾期”“已守约”，以及点击筛选中的租物选项</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.shenpi_zhima },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'risk-control_assetCertificate'">
      <view class="text-34px font-400 lh-80px">资产证明</view>
      <view class="">
        <view class="text-26px lh-[1.5]">- 营业执照</view>
        <view class="text-26px lh-[1.5]">- 车辆行驶证、房产证或其他有价值的动产不动产证件</view>
        <view class="text-26px lh-[1.5]">- 保险单</view>
        <view class="text-26px lh-[1.5]">- 其他有价值票券例股票、定额存单、公积金余额等</view>
      </view>
    </template>

    <template v-if="anchor === 'receiving_currentContract'">
      <view class="text-34px font-400 lh-80px">现场合同照片</view>
      <view class="">
        <view class="text-26px lh-[1.5]">- 协议照片</view>
        <view class="text-26px lh-[1.5]">- 客户手持协议及所租手机设备信息界面的照片</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.ludan_hetong },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'receiving_orderConfirmed'">
      <view class="text-34px font-400 lh-80px">订单确认视频</view>
      <view class="">
        <view class="text-26px lh-[1.5]">视频要求：客户手持身份证，上半身免冠出境，双方对话声音以及视频图像清晰</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.ludan_queren },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'receiving_newMachineOpened'">
      <view class="text-34px font-400 lh-80px">新机拆封视频</view>
      <view class="">
        <view class="text-26px lh-[1.5]">视频要求：原相机拍摄，画质清晰</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.ludan_chaifeng },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'receiving_identityAndVehicleCertificatePhotos'">
      <view class="text-34px font-400 lh-80px">手持身份证和电动车合格证照片</view>
      <view class="">
        <view class="text-26px lh-[1.5]">身份证照片：要求垂直拍摄的清晰无遮挡无反光照片</view>
        <view class="text-26px lh-[1.5]">身份证期限：申请人所提供证件需在有效期内</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.ludan_shouchi },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>

    <template v-if="anchor === 'receiving_lockSystemCompletion'">
      <view class="text-34px font-400 lh-80px">锁车完成后锁车系统图片</view>
      <view class="">
        <view class="text-26px lh-[1.5]">锁车界面</view>
        <view class="text-26px lh-[1.5]">车辆信息页</view>
        <view class="text-theme-primary mt-20px text-26px lh-[1.5]">示例：</view>
        <view class="mt-14px">
          <cm-media-list-slim
            :editable="false" :columns="4"
            :file-list="[
              { fileUrl: templateResource.ludan_suoche1 },
              { fileUrl: templateResource.ludan_suoche2 },
            ]"
          ></cm-media-list-slim>
        </view>
      </view>
    </template>
  </view>

  <view class="safe-pb"></view>
</template>

<style lang="less" scoped></style>
